
FROM ubuntu:22.04


## 更新源
LABEL MAINTAINER="GONSIN"
RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install
ENV TZ=Asia/Shanghai
ENV LANG C.UTF-8
RUN mv /etc/apt/sources.list /etc/apt/sources.list.bk
COPY sources.list /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y vim
RUN apt-get install -y wget

## 安装java
ADD jdk-8u231-linux-x64.tar.gz /usr/local/
ENV JAVA_HOME /usr/local/jdk1.8.0_231
ENV PATH $PATH:$JAVA_HOME/bin
RUN java -version


## 安装activemq
ADD apache-activemq-5.16.5-bin.tar.gz /usr/local/
ENV ACTIVEMQ_HOME /usr/local/apache-activemq-5.16.5
ENV PATH $PATH:$ACTIVEMQ_HOME/bin
# RUN mkdir /usr/local/activemq
# RUN ./usr/local/apache-activemq-5.16.5/bin/activemq create /usr/local/activemq
# ENV PATH $PATH:$ACTIVEMQ_HOME/bin

COPY activemq.xml /usr/local/apache-activemq-5.16.5/conf/activemq.xml
COPY jetty.xml /usr/local/apache-activemq-5.16.5/conf/jetty.xml

COPY start.sh /usr/local/bin/start.sh
RUN chmod 777 /usr/local/bin/start.sh
CMD [ "/usr/local/bin/start.sh"]
